<?php
session_start();
include_once("function_right.php");
if(!JudgeUserRight()) return FALSE;
?>

<?php
include_once "function_net_snmp.php";

$in_array['Enabled'] = $_POST['status'];
$in_array['Version'] = $_POST['IG_version'];
$in_array['TrapAddr'] = $_POST['server'];

$in_array['User'] = $_POST['username'];
$in_array['Local'] = $_POST['local'];

$in_array['Community'] = $_POST['community'];

/*
$in_array['Contract'] = $_POST['connect'];
$in_array['AuthProtocol'] = $_POST['Att_protocol_type'];
$in_array['CryProtocol'] = $_POST['encrypt_protocol_type'];
$in_array['AuthPass'] = $_POST['authpass'];
$in_array['CryPass'] = $_POST['secpass'];


if ($in_array['Version'] != "SNMPv3")
	$in_array['SecLevel'] = "noauth";
else
	$in_array['SecLevel'] = $_POST['Attestation'];
*/	

SetXmlSnmp($in_array);

include_once "function_misc_log.php";
logger("Modify", $in_array, "Snmp");

echo("<meta http-equiv='refresh'content=0;URL='net_snmp_service.php'>");

?>
